<html>
    <h1>ws测试</h1>
    <script>
        var ws_url = "ws://cutezz.cn:8812";
        var ws = new WebSocket(ws_url);
        ws.onopen = function (event) {
            ws.send('hello junwei');
            console.log('connected-success');
        }

        ws.onmessage = function (event) {
            console.log('return-data:'+ event.data);
        }

        ws.onclose = function (event) {
            console.log('close');
        }
    </script>
</html>
